package com.bjpowernode.springboot.controller;

import com.bjpowernode.springboot.service.StudentService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class StudentController {

    @DubboReference(interfaceClass = StudentService.class,version = "1.0.0",check = false)
     StudentService studentService;

    @RequestMapping(value="/student/count")
    public @ResponseBody Object studentCount(){
        Integer studentCount=studentService.queryStudentCount();
        return "学生总人数:"+studentCount;
    }
}
